;---------------------------------------------------------------------------
;Holy River
[Statedef 3000]
type    = S
movetype= A
physics = S
velset = 0,0
anim = 3000
ctrl = 0
sprpriority = 2
facep2 = 1

[State 3000, 1]
type = SuperPause
trigger1 = !Time
anim = -1
time = 47
sound = F8020, 0
darken = 0
poweradd = -1000
movetime = 46

[State 3000, 2]
type = Helper
trigger1 = !Time
name = "Super Helper"
ID = 6002
stateno = 6002
pos = ceil(-40*const(size.xscale)),ceil(-69*const(size.yscale))
postype = p1
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)

[State 3000, 3]
type = Explod
trigger1 = !Time
anim = F6003
ID = 6002
pos = 0,0
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = 47
supermovetime = 999
pausemovetime = 999
scale = 1,1
sprpriority = -990
ownpal = 1
removeongethit = 1

[State 3000, 4]
type = Helper
trigger1 = Time = 48
name = "Super Holy Water"
ID = 3000
stateno = 3001
pos = ceil(52*const(size.xscale)),0
postype = p1    
facing = 1
ownpal = 1
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)

[State 3000, 5]
type = VarAdd
trigger1 = Time = 48
var(37) = 1

[State 3001, 6]
type = Explod
trigger1 = Time = 24
anim = 3001 
ID = 3001
pos = 0,0
postype = p1
facing = 1
vfacing = 1
removetime = -2
scale = const(size.xscale),const(size.yscale)
sprpriority = -1
ownpal = 1
pausemovetime = 999
supermovetime = 999

[State 3001, 7]
type = Explod
trigger1 = Time = 36
anim = 727 
ID = 3001
pos = ceil(42*const(size.xscale)),ceil(-38*const(size.yscale))
postype = p1
facing = 1
vfacing = 1
vel = .714*const(size.xscale),0
accel = 0,.44*const(size.yscale)
removetime = 13
scale = const(size.xscale),const(size.yscale)
sprpriority = -1
ownpal = 1
pausemovetime = 999
supermovetime = 999

[State 3000, 8]
type = PlaySnd
trigger1 = AnimElem = 4 
value = S1000,0 

[State 3000, 9]
type = PlaySnd
trigger1 = Time = 49 
value = S720,1 

[State 3000, 10]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = Time = 47 && TeamSide = 1
anim = 8036
ID = 8030
pos = 87,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 3000, 11]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = Time = 47 && TeamSide = 2
anim = 8036
ID = 8030
pos = 239,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 3000, 12]
type = RemoveExplod
trigger1 = !AnimTime
id = 8030

[State 3000, 13]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;Holy Water
[Statedef 3001]
type    = S
movetype= A
physics = S
velset = 0,0
anim = 3002
ctrl = 0
sprpriority = 2

[State 3001, 1]
type = PalFX
trigger1 = !Time
time = 3
add = 256,256,256

[State 3001, 3]
type = Helper
trigger1 = !Time
name = "Holy Fire"
ID = 3001
stateno = 3002
pos = 0,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)

[State 3001, 4]
type = Helper
trigger1 = Time = 2
name = "Holy Fire"
ID = 3002
stateno = 3002
pos = ceil(32*const(size.xscale)),0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)

[State 3001, 5]
type = Helper
trigger1 = Time = 4
name = "Holy Fire"
ID = 3003
stateno = 3002
pos = ceil(64*const(size.xscale)),0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)

[State 3001, 6]
type = Helper
trigger1 = Time = 6
name = "Holy Fire"
ID = 3004
stateno = 3002
pos = ceil(96*const(size.xscale)),0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)

[State 3002, 7]
type = HitDef
trigger1 = !Time
attr = S,HA
hitflag = MAF
guardflag = LA
animtype = Medium
getpower = 0
givepower = 200,100
priority = 4,Hit
damage = ceil(280*root,Fvar(20)),70
pausetime = 2,2
sparkno = -1
guard.sparkno = -1
sparkxy = -9, 0
hitsound = F5,3
guardsound = F6,0
ground.type = Low
ground.slidetime = 5
ground.hittime = 18
guard.hittime = 16
ground.velocity = 0,-9*const(size.yscale)
ground.cornerpush.veloff = 0
guard.velocity = -9.9*const(size.yscale)
air.type = Low
air.hittime = 100
air.velocity = 0, -9*const(size.yscale)
yaccel = .35*const(size.yscale)
fall = 1
fall.recover = 0
fall.recovertime = 1
id = 3000
chainID = -1
nochainID = -1
hitonce = 0
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1

[State 3001, 8]
type = ParentVarAdd
trigger1 = NumTarget && MoveHit && root,Fvar(21) > .3
fvar(21) = -0.2
ignorehitpause = 1
persistent = 0

[State 3001, 9]
type = TargetState
trigger1 = NumTarget && MoveHit
trigger1 = HitPauseTime = 2
value = 5400
ID = -1
ignorehitpause = 1

[State 3001, 10]
type = ParentVarSet
triggerall = NumTarget && RoundState = 3
trigger1 = WinKO
var(28) = 300
ignorehitpause = 1

[State 3002, 3]
type = Null
trigger1 = MoveHit = 1
var(1) = 1
ignorehitpause = 1

[State 3002, 11]
type = Null
triggerall = NumTarget && MoveHit
trigger1 = HitPauseTime = 1
var(5) = 10
ignorehitpause = 1

[State 3002, 11]
type = ChangeAnim
trigger1 = Anim = 3002 && !AnimTime
value = 1

[State 3002, 12]
type = ParentVarAdd
trigger1 = Anim = 1
var(37) = -1

[State 3002, 13]
type = DestroySelf
triggerall = parent,Var(37) = 0
trigger1 = !NumTarget && Anim = 1
trigger2 = NumTarget && Anim = 1
trigger2 = target,StateType = L
trigger3 = (root,StateNo = [4900,4999]) && !NumTarget
;---------------------------------------------------------------------------
;Holy Fire
[Statedef 3002]
type    = S
movetype= I
physics = S
velset = 0,0
anim = 728
ctrl = 0
sprpriority = 2

[State 3002, 1]
type = DestroySelf
trigger1 = Time = 50
trigger2 = root,StateNo = [4900,4999]
;---------------------------------------------------------------------------
;Burnt by Holy Fire
[Statedef 3003]
type    = A
movetype= H
physics = N
velset = 0,-9
anim = 3001
ctrl = 0
sprpriority = 2

[State 3003, 1]
type = ChangeAnim
trigger1 = !Time
value = Cond(SelfAnimExist(25420), 25420, 5050)

[State 3003, 2]
type = Null
trigger1 =1 
value = SCA,AT
time = 1

[State 3003, 3]
type = VelAdd
trigger1 = 1
y = .35

[State 3003, 4]
type = PosAdd
trigger1 = !Time
y = -30

[State 3003, 5]
type = SelfState
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 5100
;---------------------------------------------------------------------------
;Holy Fire
[Statedef 3004]
type    = S
movetype= I
physics = S
velset = 0,0
anim = 728
ctrl = 0
sprpriority = 2

[State 3002, 1]
type = HitDef
triggerall = parent,var(1) = 0
trigger1 = !Time
attr = S,HA
hitflag = MAF
guardflag = LA
animtype = Medium
getpower = 0
priority = 4,Hit
damage = ceil(230*root,Fvar(20)),58
pausetime = 2,2
sparkno = -1
guard.sparkno = -1
sparkxy = -9, 0
hitsound = F5,3
guardsound = F6,0
ground.type = Low
ground.slidetime = 5
ground.hittime = 18
guard.hittime = 16
ground.velocity = 0,-9
ground.cornerpush.veloff = 0
guard.velocity = -9.9
air.type = Low
air.hittime = 100
air.velocity = 0, -7
fall = 1
fall.recover = 0
fall.recovertime = 1
id = 727
chainID = -1
nochainID = -1
hitonce = 0
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1

[State 3002, 2]
type = TargetState
trigger1 = NumTarget && MoveHit
trigger1 = !(target,Time)
value = 3003
ID = -1
ignorehitpause = 1

[State 3002, 3]
type = ParentVarSet
trigger1 = MoveHit = 1
var(1) = 1
ignorehitpause = 1

[State 3002, 4]
type = ParentVarSet
triggerall = NumTarget && MoveHit
trigger1 = HitPauseTime = 1
var(5) = 10
ignorehitpause = 1

[State 3002, 5]
type = DestroySelf
trigger1 = Time = 25
trigger2 = root,StateNo = [4900,4999]
;---------------------------------------------------------------------------
;Medusa's Wrath
[Statedef 3050]
type    = S
movetype= I
physics = S
velset = 0,0
anim = 3050
ctrl = 0
sprpriority = 2
facep2 = 1

[State 3050, 1]
type = SuperPause
trigger1 = !Time
anim = -1
time = 32
sound = F8020, 0
darken = 0
poweradd = -1000
movetime = 32

[State 3050, 2]
type = Helper
trigger1 = !Time
name = "Super Helper"
ID = 6002
stateno = 6002
pos = ceil(-20*const(size.xscale)),ceil(-22*const(size.yscale))
postype = p1
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)

[State 3050, 3]
type = Explod
trigger1 = !Time
anim = F6003
ID = 6002
pos = 0,0
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = 32
supermovetime = 999
pausemovetime = 999
scale = 1,1
sprpriority = -990
ownpal = 1
removeongethit = 1

[State 3050, 4]
type = Null
trigger1 = !AnimTime
var(13) = 200

[State 3050, 5]
type = Null
trigger1 = !AnimTime
var(14) = power

[State 3050, 6]
type = Explod
trigger1 = Time = 24
anim = 3054
ID = 3050
pos = ceil(-10*const(size.xscale)),ceil(-36*const(size.yscale))
postype = p1
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
pausemovetime = -1
supermovetime = -1
scale = const(size.xscale),const(size.yscale)
sprpriority = 3
ownpal = 1
removeongethit = 1

[State 0, Helper]
type = Helper
trigger1 = AnimElem = 5
name = "Medusa"
ID = 3055
stateno = 3055
pos = ceil(-12*const(size.xscale)),ceil(-62*const(size.yscale))
postype = p1
facing = 1
ownpal = 1
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)

[State 3050, 6]
type = PlaySnd
trigger1 = AnimElem = 4
value = F0,1

[State 3050, 7]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = Time = 33 && TeamSide = 1
anim = 8037
ID = 8030
pos = 87,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 3050, 7]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = Time = 33 && TeamSide = 2
anim = 8037
ID = 8030
pos = 231,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 3000, 10]
type = RemoveExplod
trigger1 = !AnimTime
id = 8030

[State 3050, 7]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;Medusa
[Statedef 3051]
type    = A
movetype= A
physics = N
velset = 3.07*const(size.xscale),4.53*const(size.yscale)
anim = 3051+random%3
ctrl = 0
sprpriority = 2

[State 3052, 1]
type = VelAdd
trigger1 = 1 
y = -.151*const(size.yscale)

[State 3052, 2]
type = HitDef
trigger1 = Var(1) = 0 && Time = 0
attr = S,NA
hitflag = MAF
guardflag = MA
getpower = 0
givepower = 40,20
animtype = Light
priority = 2,Hit
damage = ceil(25*root,FVar(21)),7
pausetime = 1,1
sparkno = S6000
guard.sparkno = -1
sparkxy = -9,ceil(-15*const(size.yscale))
hitsound = F5,0
guardsound = F6,0
ground.type = High
ground.slidetime = 8
ground.hittime = 16
ground.velocity = -3.7*const(size.xscale)
air.type = High
air.hittime = 100
air.velocity = -1.1*const(size.xscale), -4.7*const(size.yscale)
yaccel = .35*const(size.yscale)
guard.dist = 0
id = 200
chainID = -1
nochainID = -1
hitonce = 0
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1

[State 3052, 3]
type = ParentVarSet
triggerall = NumTarget && RoundState = 3
trigger1 = WinKO
var(28) = 305 
ignorehitpause = 1

[State 3052, 4]
type = VarAdd
trigger1 = MoveContact = 1
var(1) = 1

[State 3052, 5]
type = ChangeState
trigger1 = Time = 50 
value = 3052

[State 3052, 6]
type = HitOverride
trigger1 = 1
attr = SCA,NA,SA,HA,NP,SP,HP
stateno = 3054
time = -1

[State 3052, 7]
type = HitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP
time = -1

[State 3052, 8]
type = DestroySelf
trigger1 = FrontEdgeDist < -40
;---------------------------------------------------------------------------
;Medusa
[Statedef 3052]
type    = A
movetype= A
physics = N
ctrl = 0
sprpriority = 2

[State 3052, 1]
type = VelAdd
trigger1 = 1 
y = .151*const(size.yscale)

[State 3051, 3]
type = HitDef
trigger1 = Var(1) = 0 && Time = 0
attr = S,NA
hitflag = MAF
guardflag = MA
getpower = 0
givepower = 40,20
animtype = Light
priority = 2,Hit
damage = ceil(25*root,FVar(21)),7
pausetime = 1,1
sparkno = S6000
guard.sparkno = -1
sparkxy = -9,ceil(-15*const(size.yscale))
hitsound = F5,0
guardsound = F6,0
ground.type = High
ground.slidetime = 8
ground.hittime = 16
ground.velocity = -3.7*const(size.xscale)
air.type = High
air.hittime = 100
air.velocity = -1.1*const(size.xscale), -4.7*const(size.yscale)
yaccel = .35*const(size.yscale)
guard.dist = 0
id = 200
chainID = -1
nochainID = -1
hitonce = 0
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1

[State 3052, 3]
type = ParentVarSet
triggerall = NumTarget && RoundState = 3
trigger1 = WinKO
var(28) = 305
ignorehitpause = 1

[State 3052, 4]
type = VarAdd
trigger1 = MoveContact = 1
var(1) = 1

[State 3052, 5]
type = ChangeState
trigger1 = Time = 40 
value = 3053

[State 3052, 6]
type = HitOverride
trigger1 = 1
attr = SCA,NA,SA,HA,NP,SP,HP
stateno = 3054
time = -1

[State 3052, 7]
type = HitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP
time = -1

[State 3052, 8]
type = DestroySelf
trigger1 = FrontEdgeDist < -40
;---------------------------------------------------------------------------
;Medusa
[Statedef 3053]
type    = A
movetype= A
physics = N
ctrl = 0
sprpriority = 2

[State 3053, 1]
type = VelAdd
trigger1 = 1 
y = -.151*const(size.yscale)

[State 3053, 2]
type = HitDef
trigger1 = !Var(1) && !Time
attr = S,NA
hitflag = MAF
guardflag = MA
getpower = 0
givepower = 40,20
animtype = Light
priority = 2,Hit
damage = ceil(25*root,FVar(20)),7
pausetime = 1,1
sparkno = S6000
guard.sparkno = -1
sparkxy = -9,ceil(-15*const(size.yscale))
hitsound = F5,0
guardsound = F6,0
ground.type = High
ground.slidetime = 8
ground.hittime = 16
ground.velocity = -3.7*const(size.xscale)
air.type = High
air.hittime = 100
air.velocity = -1.1*const(size.xscale), -4.7*const(size.yscale)
yaccel = .35*const(size.yscale)
guard.dist = 0
id = 200
chainID = -1
nochainID = -1
hitonce = 0
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1

[State 3051, 3]
type = ParentVarSet
triggerall = NumTarget && RoundState = 3
trigger1 = WinKO
var(28) = 305 
ignorehitpause = 1

[State 3051, 4]
type = VarAdd
trigger1 = MoveContact = 1
var(1) = 1

[State 3053, 5]
type = ChangeState
trigger1 = Time = 40 
value = 3052

[State 3052, 6]
type = HitOverride
trigger1 = 1
attr = SCA,NA,SA,HA,NP,SP,HP
stateno = 3054
time = -1

[State 3052, 7]
type = HitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP
time = -1

[State 3053, 8]
type = DestroySelf
trigger1 = FrontEdgeDist < -40

;---------------------------------------------------------------------------
;Medusa (Hit)
[Statedef 3054]
type    = A
movetype= A
physics = N
velset = 0,0
anim = 902
ctrl = 0
sprpriority = 2

[State 3054, 1]
type = DestroySelf
trigger1 = !AnimTime
;---------------------------------------------------------------------------
;Medusa's Wrath
[Statedef 3055]
type    = A
movetype= I
physics = N
velset = 0,-3.78*const(size.yscale)
anim = 3055
ctrl = 0
sprpriority = 2

[State 3055, 1]
type = ChangeState
trigger1 = Time = 5
value = 3056

;---------------------------------------------------------------------------
;Medusa's Wrath
[Statedef 3056]
type    = A
movetype= I
physics = N
anim = 3056
velset = 0,0
ctrl = 0
sprpriority = 2

[State 3056, 1]
type = PalFX
trigger1 = !Time
time = 4
add = 255,255,255
mul = 256,256,256

[State 3056, 2]
type = ParentVarAdd
trigger1 = Time = 5
var(13) = 150

[State 3056, 3]
type = ParentVarSet
trigger1 = Time = 5
var(14) = parent,Power

[State 3056, 4]
type = VelSet
triggerall = Time >= 5
trigger1 = Pos X > parent,Pos X || Pos X < parent,Pos X 
x = ((parent,Pos X - Pos X)/(parent,const(size.height)))*ifelse(facing = -1,-1,1)

[State 3056, 5]
type = PlaySnd
trigger1 = !Time
value = S1110,0

[State 3056, 6]
type = AssertSpecial
trigger1 = parent,var(13) <= 50 && (GameTime % 2) = 0 && Time > 5
flag = invisible

[State 3056, 7]
type = PlaySnd
trigger1 = parent,var(13) = 50
value = S4000,1

[State 3056, 8]
type = DestroySelf
trigger1 = parent,var(13) = 0 && Time > 5
;---------------------------------------------------------------------------
;Storm of Axes
[Statedef 3100]
type    = S
movetype= A
physics = S
velset = 0,0
anim = 3100
ctrl = 0
sprpriority = 2
facep2 = 1

[State 3100, 1]
type = VarSet
trigger1 = !Time
var(17) = 0

[State 3100, 2]
type = SuperPause
trigger1 = !Time
anim = -1
time = 32
sound = F8020, 0
darken = 0
poweradd = -1000
movetime = 7

[State 3100, 3]
type = Helper
trigger1 = !Time
name = "Super Helper"
ID = 6002
stateno = 6002
pos = ceil(-40*const(size.xscale)),ceil(-69*const(size.yscale))
postype = p1
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)

[State 3100, 4]
type = Explod
trigger1 = !Time
anim = F6003
ID = 6002
pos = 0,0
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = 32
supermovetime = 999
pausemovetime = 999
scale = 1,1
sprpriority = -990
ownpal = 1
removeongethit = 1

[State 3100, 5]
type = Helper
trigger1 = AnimElem = 3 || AnimElem = 7 || AnimElem = 11 || AnimElem = 15
name = "Axe"
ID = 3100
stateno = 3101
pos = ceil(33*const(size.xscale)),ceil(-48*const(size.yscale))
postype = p1    
facing = 1
ownpal = 1
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)

[State 3100, 6]
type = VarAdd
trigger1 = AnimElem = 7 || AnimElem = 11 || AnimElem = 15
var(17) = 1

[State 3100, 7]
type = VarAdd
trigger1 = AnimElem = 3 || AnimElem = 7 || AnimElem = 11 || AnimElem = 15 ;AnimElem = 3
var(37) = 1

[State 3100, 8]
type = PlaySnd
trigger1 = AnimElem = 3 || AnimElem = 7 || AnimElem = 11 || AnimElem = 15
value = S1000,0 

[State 3100, 9]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = Time = 8 && TeamSide = 1
anim = 8039
ID = 8030
pos = 87,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 3100, 10]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = Time = 8 && TeamSide = 2
anim = 8039
ID = 8030
pos = 239,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 3100, 11]
type = RemoveExplod
trigger1 = !AnimTime
id = 8030

[State 3100, 12]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;Axe
[Statedef 3101]
type    = A
movetype= A
physics = N
velset = (1.5+(1.5*root,var(17)))*const(size.xscale),-6.9*const(size.yscale) ;5.86,-3.86
anim = 1063
ctrl = 0
sprpriority = 2

[State 3101, 1]
type = HitDef
trigger1 = !Time
attr = A,SP
hitflag = MAF
guardflag = HA
animtype = Hard
priority = 5,Hit
getpower = 0
givepower = 30, 15
damage = ceil(80*root,FVar(21)),20
pausetime = 8,8
sparkno = S6001
guard.sparkno = -1
sparkxy = -9,ceil(-13*const(size.yscale))
hitsound = F5,2
guardsound = F6,0
ground.type = High
ground.slidetime = 11
ground.hittime = 27
guard.hittime = 20
ground.velocity = -3*const(size.xscale), -4.4*const(size.yscale)
air.type = High
air.hittime = 100
air.velocity = -2.3*const(size.xscale), -3.5*const(size.yscale)
fall = 1
fall.recover = 0
fall.recovertime = 1
id = 3100
chainID = -1
nochainID = -1
hitonce = 0
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1

[State 3101, 2]
type = VelAdd
trigger1 = 1
y = .295*const(size.yscale)

[State 3101, 4]
type = HitBy
trigger1 = 1
value = SCA,SP,HP
time = -1

[State 3101, 5]
type = HitOverride
trigger1 = 1
attr = SCA,SP,HP
slot = 0
stateno = 3102
time = -1

[State 3101, 6]
type = ParentVarSet
triggerall = NumTarget && RoundState = 3
trigger1 = WinKO
var(28) = 310
ignorehitpause = 1

[State 3101, 7]
type = ParentVarAdd
trigger1 = NumTarget && MoveHit && root,Var(20) = 0
var(20) = 3
ignorehitpause = 1
persistent = 0

[State 3101, 7]
type = Null
triggerall = NumTarget && MoveHit
trigger1 = HitPauseTime = 1
var(5) = 1
ignorehitpause = 1

[State 3101, 8]
type = ChangeState
trigger1 = Pos Y >= 100
value = 3103
;-------------------------------------------------------------------------
;Axe Explod
[Statedef 3102]
type    = S
movetype= A
physics = N
ctrl = 0
velset = 0,0
anim = 6001

[State 1002, 3]
type = ParentVarAdd
trigger1 = !Time
var(37) = -1 ;(parent,Var(19) - 1)/2

[State 1002, 2]
type = ChangeAnim
trigger1 = Anim = 6001 && !AnimTime
value = 1

[State 1002, 4]
type = DestroySelf
triggerall = Anim = 1
trigger1 = !NumTarget
trigger2 = Cond(NumTarget, target,StateType = L, 0)
;-------------------------------------------------------------------------
;Axe Explod
[Statedef 3103]
type    = S
movetype= A
physics = N
ctrl = 0
velset = 0,0
anim = 1

[State 1002, 1]
type = ParentVarAdd
trigger1 = !Time
var(37) = -1 ;(parent,Var(19) - 1)/2

[State 1002, 2]
type = DestroySelf
triggerall = Time
trigger1 = !NumTarget
trigger2 = Cond(NumTarget, target,StateType = L, 0)

;---------------------------------------------------------------------------
;Death's Calling
[Statedef 4000]
type    = S
movetype= A
physics = N
velset = 0,0
anim = 4000
ctrl = 0
sprpriority = 2
facep2 = 1

[State 4000, 1]
type = SuperPause
trigger1 = !Time
anim = -1
time = 36
sound = F8020, 1
darken = 0
poweradd = -3000
movetime = 36

[State 4000, 2]
type = Helper
trigger1 = !Time
name = "Super Helper"
ID = 6002
stateno = 6002
pos = ceil(-35*const(size.xscale)),ceil(-38*const(size.yscale))
postype = p1
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)

[State 4000, 3]
type = Explod
trigger1 = !Time
anim = F6003
ID = 6002
pos = 0,0
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = 36
supermovetime = 999
pausemovetime = 999
scale = 1,1
sprpriority = -990
ownpal = 1
removeongethit = 1

[State 4000, 5]
type = Null
trigger1 = Time = 58 && RoundState = 2
var(15) = 850

[State 4000, 7]
type = PlaySnd
trigger1 = AnimElem = 7
value = S1000,0

[State 4000, 8]
type = Null
trigger1 = Time = 20
value = S4000,0

[State 4000, 9]
type = Explod
trigger1 = Time = 24
anim = 4003
ID = 4003
pos = 0,0
postype = p1
facing = 1
vfacing = 1
bindtime = -1
removetime = -2
scale = const(size.xscale),const(size.yscale)
sprpriority = 3
ownpal = 1
removeongethit = 1
supermovetime = 13

[State 4000, 9]
type = Explod
trigger1 = AnimElem = 6
anim = 4004
ID = 4004
pos = 0,0
postype = p1
facing = 1
vfacing = 1
bindtime = -1
removetime = -2
scale = const(size.xscale),const(size.yscale)
sprpriority = 3
ownpal = 1
removeongethit = 1

[State 4000, 9]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = Time = 37 && TeamSide = 1
anim = 8038
ID = 8030
pos = 87,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 4000, 10]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = Time = 37 && TeamSide = 2
anim = 8038
ID = 8030
pos = ceil(231*const(size.xscale)),ceil(23*const(size.yscale))
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 4000, 11]
type = Helper
trigger1 = AnimElem = 7
name = "Simon's Scythe"
ID = 4001
stateno = 4001
pos = ceil(17*const(size.xscale)),ceil(-38*const(size.yscale))
postype = p1   
facing = 1
keyctrl = 0
ownpal = 1
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)

[State 4000, 12]
type = VarAdd
trigger1 = AnimElem = 7
var(37) = 1

[State 4000, 13]
type = RemoveExplod
trigger1 = !AnimTime
id = 8030

[State 4000, 14]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1
;-------------------------------------------------------------------------
;Scythe (Simon)
[Statedef 4001]
type    = S
movetype= A
physics = N
ctrl = 0
sprpriority = 3
hitcountpersist = 1

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = !Time && PrevStateNo != 4001
value = 4001

[State 4001, 1]
type = VarAdd
trigger1 = !Time
var(1) = 1

[State 4001, 2]
type = HitOverride
trigger1 = 1
attr = SCA,HP
stateno = 4001
time = -1
ignorehitpause = 1

[State 4001, 3]
type = HitBy
trigger1 = 1
value = SCA,HP
time = 1

[State 4001, 4]
type = PlayerPush
trigger1 = 1
value = 0
ignorehitpause = 1

[State 4001, 5]
type = VelSet
trigger1 = 1 
x = IfElse(PrevStateNo = 4001 && Time < 2,1,8.1*const(size.xscale))

[State 4001, 6]
type = HitDef
trigger1 = (!HitCount && root,var(5) < 6) || HitCount
attr = S,HP
hitflag = MAF
guardflag = MA
getpower = 0,0
givepower = 40,20
animtype = Hard
priority = 3,Hit
getpower = 0,0
damage = ceil(20*root,FVar(20)),5
pausetime = 4,8
sparkno = S6001
sparkxy = -9,0
hitsound = F5,1
guardsound = F6,0
ground.type = High
ground.slidetime = 30
ground.hittime  = 30
ground.velocity = -3.2*const(size.xscale)
ground.cornerpush.veloff = 0
air.velocity = -4*const(size.xscale),-3.5*const(size.yscale)
yaccel = .25*const(size.yscale)
fall = 0
fall.recover = 0
fall.recovertime = 0
id = 3000
chainID = -1
nochainID = -1
numhits = 1

[State 4001, 7]
type = ParentVarAdd
trigger1 = NumTarget && MoveHit && HitCount = 1 && root,Fvar(21) > .3
fvar(21) = -0.2
ignorehitpause = 1
persistent = 0

[State 4001, 8]
type = ParentVarAdd
triggerall = NumTarget && MoveHit && P2StateType = A && HitCount = 1
trigger1 = HitPauseTime = 1
var(5) = 1
ignorehitpause = 1

[State 4001, 8]
type = ParentVarSet
triggerall = NumTarget && MoveContact && root,Var(15) = 0
trigger1 = HitPauseTime = 1
var(15) = 851
ignorehitpause = 1

[State 4001, 9]
type = ParentVarSet
triggerall = NumTarget && RoundState = 3
trigger1 = WinKO
var(28) = 400
ignorehitpause = 1

[State 4001, 10]
type = VarAdd
triggerall = NumTarget && MoveContact
trigger1 = HitPauseTime = 1 
var(0) = 1
ignorehitpause = 1

[State 4001, 11]
type = VarSet
trigger1 = 1
fvar(1) = P2BodyDist X 

[State 4001, 12]
type = VarSet
trigger1 = 1
fvar(2) = P2BodyDist Y 

[State 4001, 13]
type = ChangeState
trigger1 = MoveContact
value = IfElse(Var(0) < 5, 4001,4002)

[State 4001, 14]
type = DestroySelf
trigger1 = FrontEdgeDist < -40
;---------------------------------------------------------------------------
;Scythe (Hit)
[Statedef 4002]
type    = A
movetype= I
physics = N
velset = 0,0
anim = 4001
ctrl = 0
sprpriority = 2

[State 4002, 1]
type = AssertSpecial
trigger1 = !(GameTime % 2)
flag = invisible

[State 4002, 2]
type = ChangeAnim
trigger1 = Anim = 4001 && Time = 20
value = 1

[State 4014, 3]
type = DestroySelf
trigger1 = !NumTarget && Anim = 1
trigger2 = NumTarget && Anim = 1
trigger2 = target,StateType = L
;---------------------------------------------------------------------------
;Death (Entrance)
[Statedef 4005]
type    = A
movetype= I
physics = N
anim = 4005
ctrl = 0
sprpriority = 2

[State 4005, 1]
type = ChangeState
trigger1 = Time = 50
value = 4006
;---------------------------------------------------------------------------
;Death (Entrance)
[Statedef 4006]
type    = A
movetype= A
physics = N
anim = 4006
ctrl = 0
sprpriority = 2

[State 4006, 1]
type = VelSet
trigger1 = Pos X > parent,Pos X || Pos X < parent,Pos X 
x = ((parent,Pos X - Pos X)/(parent,const(size.height)))*ifelse(facing = -1,-1,1)

[State 4006, 6]
type = Turn
trigger1 = (Pos X > parent,Pos X && Facing = 1) || (Pos X < parent,Pos X && Facing = -1)

[State 3001, 7]
type = Null
trigger1 = NumHelper(4010) && (helper(4010),MoveHit = 1)
var(5) = 1

[State 3001, 7]
type = Null
trigger1 = NumHelper(4010) && (helper(4010),MoveHit = 1)
var(2) = 1

[State 4006, 8]
type = ChangeState
trigger1 = parent,var(15) <= 50
value = 4007
;---------------------------------------------------------------------------
;Death (Entrance)
[Statedef 4007]
type    = A
movetype= A
physics = N
velset = 0,0
anim = 4005
ctrl = 0
sprpriority = 2

[State 4007, 1]
type = DestroySelf
trigger1 = Time = 50
;---------------------------------------------------------------------------
;Scythe (Entrance)
[Statedef 4010]
type    = A
movetype= I
physics = N
velset = 0,0
anim = 4010
ctrl = 0
sprpriority = 2

[State 4010, 1]
type = AssertSpecial
trigger1 = !(GameTime % 2)
flag = invisible

[State 4010, 2]
type = ParentVarAdd
trigger1 = root,Var(16) && !Time
var(16) = -1

[State 3052, 3]
type = HitOverride
trigger1 = 1
attr = SCA,NA,SA,HA,NP,SP,HP
stateno = 4014
time = -1

[State 3052, 4]
type = HitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP
time = -1

[State 4010, 5]
type = ChangeState
trigger1 = Time = 20 
value = 4011
;---------------------------------------------------------------------------
;Scythe
[Statedef 4011]
type    = A
movetype= A
physics = N
anim = 4010
velset = (((enemynear(0),Pos X-20) - Pos X)+random%90)/40*ifelse(facing = -1,-1,1),((enemynear(0),Pos Y - Pos Y)-random%90)/40
ctrl = 0
sprpriority = 2

[State 4011, 1]
type = HitDef
trigger1 = !Time
attr = A,HA
hitflag = MAFD
guardflag = MA
animtype = Hard
priority = 3,Hit
damage = ceil(20*root,FVar(20)),5
pausetime = 1,1
sparkno = S6001
guard.sparkno = -1
sparkxy = -9,-45*floor(const(size.yscale))
hitsound = F5,4
guardsound = F6,0
ground.type = High
ground.slidetime = 11
ground.hittime = 27
ground.velocity = -0.3*const(size.xscale), -8.4
air.type = High
air.hittime = 100
air.velocity = -1.1, -5.9
fall = 1
fall.recover = 0
fall.recovertime = 1
guard.dist = 0
id = 1050
chainID = -1
nochainID = -1
hitonce = 0
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1
getpower = 0,0
givepower = 6,3

[State 4011, 2]
type = Null
trigger1 = HitPauseTime = 1
var(5) = 1
ignorehitpause = 1

[State 4011, 2]
type = Null
trigger1 = NumTarget && MoveHit && root,Fvar(21) > .3
fvar(21) = -0.2
ignorehitpause = 1
persistent = 0

[State 3052, 5]
type = HitOverride
trigger1 = 1
attr = SCA,NA,SA,HA,NP,SP,HP
stateno = 4014
time = -1

[State 3052, 6]
type = HitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP
time = -1

[State 4011,4]
type = ChangeState
trigger1 = Time = 60
value = 4012

[State 4011, 5]
type = ChangeState
trigger1 = root,var(15) <= 50
value = 4013
;---------------------------------------------------------------------------
;Scythe (Stop)
[Statedef 4012]
type    = A
movetype= I
physics = N
anim = 4010
velset = 0,0
ctrl = 0
sprpriority = 2

[State 4011, 1]
type = ChangeState
trigger1 = Time = 30
value = 4011

[State 3052, 5]
type = HitOverride
trigger1 = 1
attr = SCA,NA,SA,HA,NP,SP,HP
stateno = 4014
time = -1

[State 3052, 6]
type = HitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP
time = -1

[State 4011, 2]
type = ChangeState
trigger1 = root,var(15) <= 50
value = 4013
;---------------------------------------------------------------------------
;Scythe (Disappear)
[Statedef 4013]
type    = A
movetype= I
physics = N
anim = 4010
velset = 0,0
ctrl = 0
sprpriority = 2

[State 4013, 1]
type = AssertSpecial
trigger1 = !(GameTime % 2)
flag = invisible

[State 4013, 2]
type = DestroySelf
trigger1 = Time = 60
;---------------------------------------------------------------------------
;Scythe (Hit)
[Statedef 4014]
type    = A
movetype= I
physics = N
velset = 0,0
anim = 902
ctrl = 0
sprpriority = 2

[State 4014, 1]
type = ChangeAnim
trigger1 = Anim = 902 && !AnimTime
value = 1

[State 4014, 2]
type = ParentVarAdd
trigger1 = !Time
var(16) = 1
ignorehitpause = 1

[State 4014, 3]
type = DestroySelf
trigger1 = !NumTarget && Anim = 1
trigger2 = NumTarget && Anim = 1
trigger2 = target,StateType = L
;---------------------------------------------------------------------------
;???
[Statedef 4050]
type    = S
movetype= A
physics = N
velset = 0,0
anim = 4050
ctrl = 0
sprpriority = 2
facep2 = 1

[State 4000, 1]
type = SuperPause
trigger1 = !Time
anim = -1
time = 36
sound = F8020, 1
darken = 0
poweradd = -3000
movetime = 4

[State 4000, 2]
type = Helper
trigger1 = !Time
name = "Super Helper"
ID = 6002
stateno = 6002
pos = ceil(-1*const(size.xscale)),ceil(-37*const(size.yscale))
postype = p1
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)

[State 4000, 3]
type = Explod
trigger1 = !Time
anim = F6003
ID = 6002
pos = 0,0
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = 36
supermovetime = 999
pausemovetime = 999
scale = 1,1
sprpriority = -990
ownpal = 1
removeongethit = 1

[State 4000, 7]
type = PlaySnd
trigger1 = AnimElem = 2
value = S1100,0

[State 4000, 8]
type = HitDef
trigger1 = var(5) < 10 && AnimElem = 6
attr = S,HT
hitflag = MAF
guardflag = MA
animtype = Hard
priority = 5,Hit
getpower = 0,0
givepower = 300,150
damage = 0,20
sparkno = -1
hitsound = S190,0
guardsound = F6,0
p1stateno = 4051
id = 4050
chainID = -1
nochainID = -1
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1

[State 4000, 9]
type = StateTypeSet
trigger1 = AnimElem = 7
movetype = I

[State 4000, 10]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;???
[Statedef 4051]
type    = S
movetype= A
physics = N
velset = 0,0
anim = 4051
ctrl = 0
sprpriority = 2

[State 4051, 1]
type = TargetState
trigger1 = !Time
value = 4060

[State 4051, 2]
type = TargetBind
trigger1 = abs((target,Pos X)-Pos X) >= (90*const(size.xscale)) && !Time
time = 1
pos = 90*const(size.xscale),0;Cond(abs((target,Pos X)-Pos X) >= 100,100,abs((target,Pos X)-Pos X)),0

[State 4051, 2]
type = TargetBind
trigger1 = Time = 1
time = 1
pos = 60*const(size.xscale),0;Cond(abs((target,Pos X)-Pos X) >= 100,100,abs((target,Pos X)-Pos X)),0

[State 4051, 3] ;fucking sanity check
type = VarSet
trigger1 = NumTarget && Time = 2
fvar(17) = Cond(Facing = target,Facing,target,const(size.ground.front),target,const(size.ground.back))

[State 4051, 3] ;fucking sanity check
type = VarSet
trigger1 = NumTarget && Time = 2
fvar(18) = Cond(Facing = target,Facing,target,const(size.ground.back),target,const(size.ground.front))

[State 4051, 4]
type = Explod
trigger1 = Time = 2
anim = 4054
ID = 4050
pos = ceil(43*const(size.xscale)),ceil(-39*const(size.yscale))
postype = P1
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = const(size.xscale),const(size.yscale)
sprpriority = 3
ownpal = 0
removeongethit = 0
 
[State 4051, 5]
type = Explod
trigger1 = Time = 2
anim = 4054
ID = 4050
pos = ceil(51*const(size.xscale)),ceil(-37*const(size.yscale))
postype = P1
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = const(size.xscale),const(size.yscale)
sprpriority = 3
ownpal = 0
removeongethit = 0
 
[State 4051, 6]
type = Explod
trigger1 = Time = 2
anim = 4054
ID = 4050
pos = ceil(59*const(size.xscale)),ceil(-37*const(size.yscale))
postype = P1
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = const(size.xscale),const(size.yscale)
sprpriority = 3
ownpal = 0
removeongethit = 0
 
[State 4051, 7]
type = Explod
trigger1 = Time = 2
anim = 4054
ID = 4050
pos = ceil(67*const(size.xscale)),ceil(-37*const(size.yscale))
postype = P1
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = const(size.xscale),const(size.yscale)
sprpriority = 3
ownpal = 0
removeongethit = 0
 
[State 4051, 8]
type = Explod
trigger1 = Time = 2 && Cond(Facing = target,Facing,target,const(size.ground.front),target,const(size.ground.back)) >= 20*const(size.xscale)
anim = 4054
ID = 4050
pos = ceil(75*const(size.xscale)),ceil(-37*const(size.yscale))
postype = P1
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = const(size.xscale),const(size.yscale)
sprpriority = 3
ownpal = 0
removeongethit = 0
 
[State 4051, 9]
type = Explod
trigger1 = Time = 2 && Cond(Facing = target,Facing,target,const(size.ground.front),target,const(size.ground.back)) >= 24*const(size.xscale)
anim = 4054
ID = 4050
pos = ceil(83*const(size.xscale)),ceil(-37*const(size.yscale))
postype = P1
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = const(size.xscale),const(size.yscale)
sprpriority = 3
ownpal = 0
removeongethit = 0
 
[State 4051, 10]
type = Explod
trigger1 = Time = 2 && Cond(Facing = target,Facing,target,const(size.ground.front),target,const(size.ground.back)) >= 28*const(size.xscale)
anim = 4054
ID = 4050
pos = ceil(91*const(size.xscale)),ceil(-37*const(size.yscale))
postype = P1
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = const(size.xscale),const(size.yscale)
sprpriority = 3
ownpal = 0
removeongethit = 0
 
[State 4051, 11]
type = Explod
trigger1 = Time = 2 && Cond(Facing = target,Facing,target,const(size.ground.front),target,const(size.ground.back)) >= 32*const(size.xscale)
anim = 4054
ID = 4050
pos = ceil(99*const(size.xscale)),ceil(-37*const(size.yscale))
postype = P1
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = const(size.xscale),const(size.yscale)
sprpriority = 3
ownpal = 0
removeongethit = 0
 
[State 4051, 12]
type = Explod
trigger1 = Time = 2 && Cond(Facing = target,Facing,target,const(size.ground.front),target,const(size.ground.back)) >= 36*const(size.xscale)
anim = 4054
ID = 4050
pos = ceil(107*const(size.xscale)),ceil(-37*const(size.yscale))
postype = P1
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = const(size.xscale),const(size.yscale)
sprpriority = 3
ownpal = 0
removeongethit = 0

[State 4051, 13]
type = Explod
trigger1 = Time = 2
anim = 4054
ID = 4050
pos = floor(Cond(fvar(17) >= 20*const(size.xscale),abs(Pos X - (target,Pos X + (fvar(17)*Facing))),73*const(size.yscale))),ceil(-39*const(size.yscale))
postype = P1
facing = 1
vfacing = 1
bindtime = 1
removetime = -1
scale = const(size.xscale),const(size.yscale)
sprpriority = 3
ownpal = 0
removeongethit = 0
;floor(abs((target,Pos X + target,const(size.ground.back)-8) - Pos X))

[State 4051, 14]
type = Explod
trigger1 = Time = 2
anim = 4055
ID = 4050
pos = ceil(53*const(size.xscale)),ceil(-33*const(size.yscale))
postype = P1
facing = -1
vfacing = 1
bindtime = 1
removetime = -2
scale = const(size.xscale),const(size.yscale)
sprpriority = -3
ownpal = 0
removeongethit = 0

[State 4051, 15]
type = BGPalFX
trigger1 = Time = 32
time = 16
mul = 192,192,129

[State 4051, 15]
type = BGPalFX
trigger1 = Time = 48
time = 16
mul = 128,128,128

[State 4051, 17]
type = BGPalFX
trigger1 = Time = 64
time = 16
mul = 64,64,64

[State 4051, 18]
type = BGPalFX
trigger1 = Time = 80
time = 239
mul = 0,0,0

[State 4051, 19]
type = PalFX
trigger1 = Time = 32
time = 16
mul = 192,192,129

[State 4051, 20]
type = PalFX
trigger1 = Time = 48
time = 16
mul = 128,128,128

[State 4051, 21]
type = PalFX
trigger1 = Time = 64
time = 16
mul = 64,64,64

[State 4051, 22]
type = PalFX
trigger1 = Time = 80
time = 239
mul = 0,0,0

[State 4051, 23]
type = PlaySnd
trigger1 = Time = 32
value = S4000,1

[State 4051, 24]
type = AssertSpecial
trigger1 = Time >= 80
flag = Invisible
flag2 = NoBarDisplay
flag3 = NoFG

[State 4051, 25]
type = AssertSpecial
trigger1 = Time >= 80
flag = NoMusic

[State 4051, 26]
type = VarSet
trigger1 = Time = 80
var(30) = 1

[State 4051, 27]
type = ChangeState
trigger1 = Time = 81
value = 4052

;---------------------------------------------------------------------------
;???
[Statedef 4052]
type    = S
movetype= A
physics = N
velset = 0,0
anim = 4051
ctrl = 0
sprpriority = 2

[State 4052, 1]
type = AssertSpecial
trigger1 = 1
flag = Invisible
flag2 = NoBarDisplay
flag3 = NoFG

[State 4052, 2]
type = AssertSpecial
trigger1 = 1
flag = NoMusic

[State 4052, 3]
type = PlaySnd
trigger1 = !Time || Time = 80 || Time = 134 || Time = 200
value = S4052,0

[State 4053, 4]
type = RemoveExplod
trigger1 = !Time
id = 4050

[State 4051, 3] ;fucking sanity check
type = VarSet
trigger1 = NumTarget && !Time
fvar(17) = Cond(Facing = target,Facing,abs((target,Pos X - (target,const(size.ground.back)*Facing)) - Pos X),abs((target,Pos X - (target,const(size.ground.front)*Facing)) - Pos X))

;1-----
[State 4052, 5]
type = Explod
trigger1 = !Time
anim = 4070
ID = 4070
pos = floor(fvar(17)-ceil(48*const(size.xscale))),0
postype = P1
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = const(size.xscale),const(size.yscale)
sprpriority = 5
ownpal = 1

[State 4052, 6]
type = Explod
trigger1 = Time = 33 || Time = 53 || Time = 70
anim = 1001
ID = 4070
pos = floor(fvar(17)-ceil(2*const(size.xscale))),ceil(-32*const(size.yscale))
postype = P1
facing = 1
vfacing = 1
bindtime = 1
vel = 4*const(size.xscale),0
removetime = -2
scale = const(size.xscale),const(size.yscale)
sprpriority = 5
ownpal = 1

[State 4052, 7]
type = Explod
trigger1 = Time = 38 || Time = 56 || Time = 73
anim = 6001
ID = 4070
pos = floor(fvar(17)+ceil(8*const(size.xscale))),ceil(-32*const(size.yscale))
postype = P1
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
removetime = -2
scale = const(size.xscale),const(size.yscale)
sprpriority = 5
ownpal = 1

[State 4052, 8]
type = PlaySnd
trigger1 = Time = 33 || Time = 53 || Time = 70
value = S1000,0

[State 4052, 9]
type = PlaySnd
trigger1 = Time = 38 || Time = 56 || Time = 73
value = F5,2

[State 4052, 10]
type = TargetLifeAdd
trigger1 = Time = 38 || Time = 56 || Time = 73
value = ceil(-60*Fvar(20))
kill = 0

[State 4052, 11]
type = TargetState
trigger1 = Time = 38 || Time = 56 || Time = 73
value = 4061

;2-----
[State 4052, 12]
type = Explod
trigger1 = Time = 80
anim = 4072
ID = 4070
pos = floor(fvar(17)-ceil(48*const(size.xscale))),0
postype = P1
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = const(size.xscale),const(size.yscale)
sprpriority = 5
ownpal = 1

[State 4052, 13]
type = Explod
trigger1 = Time = 98
anim = 4073
ID = 4070
pos = floor(fvar(17)-ceil(32*const(size.xscale))),ceil(-48*const(size.yscale))
postype = P1
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = const(size.xscale),const(size.yscale)
sprpriority = 5
ownpal = 1

[State 4052, 14]
type = Explod
trigger1 = Time = 101 || Time = 103 || Time = 105 || Time = 108
anim = 6001
ID = 4070
pos = floor(fvar(17)+ceil(8*const(size.xscale))),ceil(-48*const(size.yscale))
postype = P1
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
removetime = -2
scale = const(size.xscale),const(size.yscale)
sprpriority = 5
ownpal = 1

[State 4052, 15]
type = PlaySnd
trigger1 = Time = 98
value = S4052,1

[State 4052, 16]
type = PlaySnd
trigger1 = Time = 101 || Time = 103 || Time = 105 || Time = 108
value = F5,3

[State 4052, 17]
type = TargetLifeAdd
trigger1 = Time = 101 || Time = 103 || Time = 105 || Time = 108
value = ceil(-30*Fvar(20))
kill = 0

[State 4052, 18]
type = TargetState
trigger1 = Time = 101
value = 4062

;3-----
[State 4052, 19]
type = Explod
trigger1 = Time = 134
anim = 4074
ID = 4070
pos = floor(fvar(17)-ceil(48*const(size.xscale))),0
postype = P1
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = const(size.xscale),const(size.yscale)
sprpriority = 5
ownpal = 1

[State 4052, 20]
type = Explod
trigger1 = Time = 162 || Time = 170 || Time = 178
anim = 4075
ID = 4070
pos = floor(fvar(17)-ceil(24*const(size.xscale))),ceil(-30*const(size.yscale))
postype = P1
vel = 8*const(size.xscale),0
facing = 1
vfacing = 1
bindtime = 1
removetime = 6
scale = const(size.xscale),const(size.yscale)
sprpriority = 5
ownpal = 1

[State 4052, 21]
type = Explod
trigger1 = Time = 162 || Time = 170 || Time = 178
anim = 4075
ID = 4070
pos = floor(fvar(17)-ceil(24*const(size.xscale))),ceil(-36*const(size.yscale))
postype = P1
vel = 7.6*const(size.xscale),-3*const(size.yscale)
facing = 1
vfacing = 1
bindtime = 1
removetime = 6
scale = const(size.xscale),const(size.yscale)
sprpriority = 5
ownpal = 1

[State 4052, 22]
type = Explod
trigger1 = Time = 162 || Time = 170 || Time = 178
anim = 4075
ID = 4070
pos = floor(fvar(17)-ceil(24*const(size.xscale))),ceil(-24*const(size.yscale))
postype = P1
vel = 7.6*const(size.xscale),3*const(size.yscale)
facing = 1
vfacing = 1
bindtime = 1
removetime = 6
scale = const(size.xscale),const(size.yscale)
sprpriority = 5
ownpal = 1

[State 4052, 23]
type = Explod
trigger1 = Time = 168 || Time = 176 || Time = 184
anim = 6001
ID = 4070
pos = floor(fvar(17)+ceil(8*const(size.xscale))),ceil(-30*const(size.yscale))
postype = P1
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
removetime = -2
scale = const(size.xscale),const(size.yscale)
sprpriority = 5
ownpal = 1

[State 4052, 24]
type = Explod
trigger1 = Time = 168 || Time = 176 || Time = 184
anim = 6001
ID = 4070
pos = floor(fvar(17)+ceil(8*const(size.xscale))),ceil(-48*const(size.yscale))
postype = P1
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
removetime = -2
scale = const(size.xscale),const(size.yscale)
sprpriority = 5
ownpal = 1

[State 4052, 25]
type = Explod
trigger1 = Time = 168 || Time = 176 || Time = 184
anim = 6001
ID = 4070
pos = floor(fvar(17)+ceil(8*const(size.xscale))),ceil(-12*const(size.yscale))
postype = P1
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
removetime = -2
scale = const(size.xscale),const(size.yscale)
sprpriority = 5
ownpal = 1

[State 4052, 26]
type = TargetLifeAdd
trigger1 = Time = 168 || Time = 176 || Time = 184
value = ceil(-75*Fvar(20))
kill = 0

[State 4052, 27]
type = TargetState
trigger1 = Time = 168 || Time = 176 || Time = 184
value = 4061

[State 4052, 28]
type = PlaySnd
trigger1 = Time = 162 || Time = 170 || Time = 178
value = S4052,2

[State 4052, 29]
type = PlaySnd
trigger1 = Time = 168 || Time = 176 || Time = 184
value = F5,2
;4-----
[State 4052, 30]
type = Explod
trigger1 = Time = 200
anim = 4076
ID = 4070
pos = floor(fvar(17)-ceil(48*const(size.xscale))),0
postype = P1
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = const(size.xscale),const(size.yscale)
sprpriority = 5
ownpal = 1

[State 4052, 31]
type = PlaySnd
trigger1 = Time = 234
value = S4052,3

[State 4052, 32]
type = TargetLifeAdd
trigger1 = Time = 238
value = ceil(-80*Fvar(20))
kill = 1

[State 4052, 3]
type = ChangeState
trigger1 = Time = 239
value = 4053
;---------------------------------------------------------------------------
;???
[Statedef 4053]
type    = S
movetype= A
physics = N
velset = 0,0
anim = Cond(RoundState = 3, 188, 4053)
ctrl = 0
sprpriority = 2

[State 4053, 1]
type = EnvColor
trigger1 = !Time
value = 255,255,255
time = 5

[State 4053, 2]
type = VarSet
trigger1 = !Time
var(30) = 0

[State 4052, 3]
type = TargetState
trigger1 = Time = 5
value = 4064

[State 4053, 4]
type = PlaySnd
trigger1 = !Time
value = S4053,0

[State 4053, 5]
type = AssertSpecial
trigger1 = Time < 140
flag = NoMusic

[State 4053, 6]
type = ChangeState
trigger1 = RoundState = 3 && Time >= 5
value = 0

[State 4053, 7]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;???
[Statedef 4060]
type    = S
movetype= H
physics = N
velset = 0,0
ctrl = 0
sprpriority = -3

[State 4060, 1]
type = ChangeAnim2
trigger1 = !Time
value = 4060

[State 4060, 2]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

;---------------------------------------------------------------------------
;???
[Statedef 4061]
type    = S
movetype= H
physics = N
velset = 0,0
ctrl = 0
sprpriority = -3

[State 4061, 1]
type = ChangeAnim2
trigger1 = !Time
value = 4061

[State 4060, 2]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1
;---------------------------------------------------------------------------
;???
[Statedef 4062]
type    = S
movetype= H
physics = N
velset = 0,0
ctrl = 0
sprpriority = -3

[State 4062, 1]
type = ChangeAnim
trigger1 = !Time
value = 25400

[State 4062, 2]
type = ChangeAnim2
trigger1 = Time = 52
value = 4062

[State 4060, 3]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1
;---------------------------------------------------------------------------
;???
[Statedef 4063]
type    = S
movetype= H
physics = N
velset = 0,0
ctrl = 0
sprpriority = -3

[State 4063, 1]
type = ChangeAnim
trigger1 = !Time
value = 5002

[State 4063, 2]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1
;---------------------------------------------------------------------------
;???
[Statedef 4064]
type    = S
movetype= H
physics = N
velset = 0,0
ctrl = 0
sprpriority = -3

[State 4064, 1]
type = ChangeAnim2
trigger1 = !Time
value = 4064

[State 4064, 2]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1
[State 4064, 3]
type = ChangeState
trigger1 = (!SelfAnimExist(5600) || Alive) && Time = 140
value = 5810

[State 4064, 4]
type = SelfState
trigger1 = SelfAnimExist(5600) && !Alive
value = 5600